package xyz.xiezc.spider;

import cn.hutool.setting.Setting;
import xyz.xiezc.ioc.annotation.Component;
import xyz.xiezc.ioc.annotation.Configuration;
import xyz.xiezc.spider.statistic.Site;

/**
 * @author wb-xzc291800
 * @date 2019/04/08 17:21
 */
@Configuration
public class Config {

    /**
     * 将配置文件注入到容器中, 并且实时监控配置文件的变化
     *
     * @return
     */
    @Component
    public Setting setting() {
        Setting setting = new Setting("xSpider.setting");
        setting.autoLoad(false);
        return setting;
    }

    /**
     * @return
     */
    @Component
    public Site site() {
        return new Site();
    }

}
